// 基于template/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{spinalCase ctrl.codeName}}-form-model.ts.hbs生成
import { IEditFormModel, IFormStore, IParam } from '@/core';
function getModel(): IEditFormModel {
	return {
		name: 'form',
		caption: '',
		codeName: 'Main',
		enableAutoSave: false,
		entityCodeName: 'OPEN_ACCESS',
		keyPSAppDEField: 'Id',
		majorPSAppDEField: 'Name',
		cssName: '',
		controlType: 'FORM',
		formStyle: '',
		valueRule: getValueRule(),
		createDefaultItems: getCreateDefaultItems(),
		updateDefaultItems: getUpdateDefaultItems(),
		detailModel: getDetailModel(),
		uiEngineModel: [
			{
				name: 'engine_form',
				triggerType: 'CTRLEVENT',
				logicType: 'APPVIEWENGINE',
				eventNames: 'LOAD;SAVE;REMOVE',
				scriptCode: ``,
				entityCodeName: '',
				logicName: ``,
			},
		],
	};
}
function getValueRule() {
	return [];
}

function getCreateDefaultItems() {
	return [
		{
			createDV: '0',
			createDVT: '',
			property: 'disabled',
			valueFormat: '',
			dataType: 9,
		},
	];
}

function getUpdateDefaultItems() {
	return [];
}
function getDetailModel() {
	return {
		formpage1: {
			caption: '基本信息',
			captionItemName: '',
			name: 'formpage1',
			codeName: 'formpage1',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMPAGE',
			showCaption: false,
			enableAnchor: false,
			showMoreMode: 0,
		},
		group1: {
			caption: '开放接入基本信息',
			captionItemName: '',
			name: 'group1',
			codeName: 'group1',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'GROUPPANEL',
			showCaption: false,
			enableAnchor: false,
			showMoreMode: 0,
			showMoreItems: [],
		},
		id: {
			caption: '标识',
			captionItemName: '',
			name: 'id',
			codeName: 'id',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Id',
			dataType: '25',
			required: false,
			enableCond: 1,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		name: {
			caption: '名称',
			captionItemName: '',
			name: 'name',
			codeName: 'name',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Name',
			dataType: '25',
			required: true,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		predef_type: {
			caption: '预定义类型',
			captionItemName: '',
			name: 'predef_type',
			codeName: 'predef_type',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Predef_type',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			codeListTag: 'open__Open_access_type_justAuth',
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
			groupLogics: [
				{
					name: '表单成员[predef_type][面板显示]逻辑',
					logicType: 'GROUP',
					logicCat: 'PANELVISIBLE',
					notMode: false,
					groupOP: 'AND',
					relatedDetailNames: ['update_time'],
					childLogics: [
						{
							name: '',
							logicType: 'SINGLE',
							logicCat: '',
							condOP: 'ISNULL',
							dEFDName: 'update_time',
							value: '',
						},
					],
				},
			],
		},
		open_type: {
			caption: '类型',
			captionItemName: '',
			name: 'open_type',
			codeName: 'open_type',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Open_type',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
			groupLogics: [
				{
					name: '表单成员[open_type][面板显示]逻辑',
					logicType: 'GROUP',
					logicCat: 'PANELVISIBLE',
					notMode: false,
					groupOP: 'AND',
					relatedDetailNames: ['open_type', 'predef_type', 'update_time'],
					childLogics: [
						{
							name: '',
							logicType: 'GROUP',
							logicCat: '',
							notMode: false,
							groupOP: 'OR',
							relatedDetailNames: [],
							childLogics: [
								{
									name: '',
									logicType: 'SINGLE',
									logicCat: '',
									condOP: 'ISNOTNULL',
									dEFDName: 'open_type',
									value: '',
								},
								{
									name: '',
									logicType: 'SINGLE',
									logicCat: '',
									condOP: 'EQ',
									dEFDName: 'predef_type',
									value: 'custom',
								},
								{
									name: '',
									logicType: 'SINGLE',
									logicCat: '',
									condOP: 'ISNOTNULL',
									dEFDName: 'update_time',
									value: '',
								},
							],
						},
					],
				},
			],
		},
		button1: {
			caption: '同步机构用户',
			captionItemName: '',
			name: 'button1',
			codeName: 'button1',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'BUTTON',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			uIAction: {
				caption: '同步机构用户',
				uIActionMode: 'BACKEND',
				disabled: false,
				visible: true,
				uIActionTag: 'Sync',
				noPrivDisplayMode: 2,
				dataAccessAction: '',
				actionTarget: 'SINGLEDATA',
				showCaption: true,
				predefinedType: '',
				actionDECodeName: 'OPEN_ACCESS',
			},
			groupLogics: [
				{
					name: '表单成员[button1][面板显示]逻辑',
					logicType: 'GROUP',
					logicCat: 'PANELVISIBLE',
					notMode: false,
					groupOP: 'AND',
					relatedDetailNames: ['update_time', 'open_type', 'predef_type'],
					childLogics: [
						{
							name: '',
							logicType: 'SINGLE',
							logicCat: '',
							condOP: 'ISNOTNULL',
							dEFDName: 'update_time',
							value: '',
						},
						{
							name: '',
							logicType: 'GROUP',
							logicCat: '',
							notMode: false,
							groupOP: 'OR',
							relatedDetailNames: [],
							childLogics: [
								{
									name: '',
									logicType: 'SINGLE',
									logicCat: '',
									condOP: 'EQ',
									dEFDName: 'open_type',
									value: 'dingtalk',
								},
								{
									name: '',
									logicType: 'SINGLE',
									logicCat: '',
									condOP: 'EQ',
									dEFDName: 'predef_type',
									value: 'dingtalk',
								},
								{
									name: '',
									logicType: 'SINGLE',
									logicCat: '',
									condOP: 'EQ',
									dEFDName: 'open_type',
									value: 'wxwork',
								},
								{
									name: '',
									logicType: 'SINGLE',
									logicCat: '',
									condOP: 'EQ',
									dEFDName: 'predef_type',
									value: 'wxwork',
								},
							],
						},
					],
				},
			],
		},
		disabled: {
			caption: '是否禁用',
			captionItemName: '',
			name: 'disabled',
			codeName: 'disabled',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Disabled',
			dataType: '9',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			codeListTag: 'YesNo',
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		access_key: {
			caption: 'AccessKey(AppId)',
			captionItemName: '',
			name: 'access_key',
			codeName: 'access_key',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Access_key',
			dataType: '25',
			required: true,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		secret_key: {
			caption: 'SecretKey(AppSecret)',
			captionItemName: '',
			name: 'secret_key',
			codeName: 'secret_key',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Secret_key',
			dataType: '25',
			required: true,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		redirect_uri: {
			caption: '重定向地址',
			captionItemName: '',
			name: 'redirect_uri',
			codeName: 'redirect_uri',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Redirect_uri',
			dataType: '25',
			required: true,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		agent_id: {
			caption: 'AgentId',
			captionItemName: '',
			name: 'agent_id',
			codeName: 'agent_id',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Agent_id',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		region_id: {
			caption: 'RegionId',
			captionItemName: '',
			name: 'region_id',
			codeName: 'region_id',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Region_id',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		grant_types: {
			caption: '授权类型',
			captionItemName: '',
			name: 'grant_types',
			codeName: 'grant_types',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Grant_types',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		dc_default: {
			caption: '默认应用于',
			captionItemName: '',
			name: 'dc_default',
			codeName: 'dc_default',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Dc_default',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
			resetItemName: 'id',
			groupLogics: [
				{
					name: '表单成员[dc_default][面板显示]逻辑',
					logicType: 'GROUP',
					logicCat: 'PANELVISIBLE',
					notMode: false,
					groupOP: 'AND',
					relatedDetailNames: ['update_time'],
					childLogics: [
						{
							name: '',
							logicType: 'SINGLE',
							logicCat: '',
							condOP: 'ISNULL',
							dEFDName: 'update_time',
							value: '',
						},
					],
				},
			],
		},
		access_token: {
			caption: '管理账号token',
			captionItemName: '',
			name: 'access_token',
			codeName: 'access_token',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Access_token',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		expires_time: {
			caption: '管理账号token过期时间',
			captionItemName: '',
			name: 'expires_time',
			codeName: 'expires_time',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: 'YYYY-MM-DD HH:mm:ss',
			fieldCodeName: 'Expires_time',
			dataType: '5',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			editRules: {
				editorType: 'DATEPICKER',
			},
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		description: {
			caption: '描述',
			captionItemName: '',
			name: 'description',
			codeName: 'description',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Description',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			editRules: {
				editorType: 'TEXTAREA_10',
			},
			layout: { parentLayout: 'TABLE_24COL', colLG: 24, colMD: 24 },
		},
		update_time: {
			caption: '最后更新时间',
			captionItemName: '',
			name: 'update_time',
			codeName: 'update_time',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: false,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: 'YYYY-MM-DD HH:mm:ss',
			fieldCodeName: 'Update_time',
			dataType: '5',
			required: false,
			enableCond: 0,
			ignoreInput: 3,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		druipart1: {
			caption: '',
			captionItemName: '',
			name: 'druipart1',
			codeName: 'druipart1',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'DRUIPART',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
		},
	};
}
export const model = getModel();
